package org.example.text03;

import java.time.LocalDate;

/**
 * 绿色法杖，实现MagicStick接口
 */

public class GreenStick implements MagicStick{

    @Override
    public int fire() {
        //获取当前月数
        int monthValue = LocalDate.now().getMonthValue();
        if (monthValue >= 6 && monthValue <= 8){
            return 2;
        }else {
            return 1;
        }

    }
}
